n1 = eval(input("请输入第一个数："))
n2 = eval(input("请输入第二个数："))

min = n1 if n1 < n2 else n2

while min>1:
    if n1 % min == 0 and n2 %min == 0:
        gcd = min
        break
    min -=1

print(n1,"和",n2,"的最大公约数为：",gcd)